<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>

    /*清除样式*/
    * {
        margin: 0;
        padding: 0;
    }

    span {
        /*块元素转行内块*/
        display: inline-block;
        /*设置行内块的宽度*/
        width: 60px;
        /*设置文字与盒子的内边距*/
        padding: 5px 10px;
        /*设置盒子之间的外边距*/
        margin: 2px;
        /*设置边框*/
        border: 1px solid black;
        /*圆角*/
        border-radius: 3px;
        /*阴影*/
        box-shadow: 2px 2px 2px pink;
        /*文字水平居中*/
        text-align: center;
    }
</style>
<body>

<script>
    for (let i = 1; i <= 9; i++) {
        for (let j = 1; j <= i; j++) {
            document.write(`<span>${i}x${j}=${i * j}</span>`)
        }
        document.write(`<br>`)
    }
</script>
</body>
</html>